package com.hg.design.structure.decorator.biancheng.ex1;

public class DecoratorPattern {
    public static void main(String[] args) {
        Component p = new ConcreteComponent();
        p.operation();
        Component p2 = new ConcreteTwoComponent();
        p2.operation();
        System.out.println("---------------------------------");
        Component d = new ConcreteDecorator(p2);
        d.operation();
    }
}
